package ${cfg.basePackage}.mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ${cfg.basePackage}.mybatis.table.${entity};

/**
 * ${table.comment!} Mapper映射
 */
<#if kotlin>
interface ${table.mapperName} : ${superMapperClass}<${entity}>
<#else>
public interface ${entity}Mapper extends ${superMapperClass}<${entity}> {

    //参考用法 -- Insert
    //@Insert("insert into 表名 (id) values (${r"#{id}"})")
    //long insertOneById(@Param("id") Object id);

    //参考用法 -- Delete
    //@Delete("delete from 表名 where id=${r"#{id}"}")
    //long deleteOneById(@Param("id") Object id);

    //参考用法 -- Update
    //@Update("update 表名 set dCi=0 where id=${r"#{id}"}")
    //long updateOneById(@Param("id") Object id);

    //参考用法 -- Select
    //@Select("select id from 表名 where id=${r"#{id}"}")
    //${entity} selectOneById(@Param("id") Object id);

    //参考用法 -- 关联表分页查询
    //    @Select("select 0_${table.entityPath}.*,a_user.name as userName, a_user.phone as userPhone "
    //            + "from 0_${table.entityPath} "
    //            + "left join a_user on 0_${table.entityPath}.create_uid=a_user.id "
    //            + "${r"${ew.customSqlSegment}"}")
    //    IPage<${entity}> leftJoinPage(Page<${entity}> page, @Param(Constants.WRAPPER) Wrapper<${entity}> wrapper);

}
</#if>
